


import java.util.Vector;
import java.io.*;  

public class PolicyProperty implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 3509564326303544278L;
	//info about organization
	String organizationName;
	String emailAddress;
	String webHomePage;
	String phoneNumber;
	//mailing address
	String addressName;
	String address;
	String city;
	String state;
	String postalCode;
	String country;
	//web site
	String policyName;
	String optUrl;
	String policyLanguage;
	String readablePolicyUrl;
	//access
	int access;
	/*
	 * 0 - no identified data is collected(so no access is possible)
	 * 1 - all information on the user
	 * 2 - contact and other information
	 * 3 - contact information only
	 * 4 - other information
	 * 5 - none(user cannot view their information)
	 * */	
	public static final int ACCESS_NO_DATA_COLLECT=0;
	public static final int ACCESS_ALL=1;
	public static final int ACCESS_CONTACT_AND_OTHER=2;
	public static final int ACCESS_CONTACT=3;
	public static final int ACCESS_OTHER=4;
	public static final int ACCESS_NONE=5;
	
	//assurance
	Vector<Assurance> assurance;
	
	//expiry
	boolean calMode; /*true - use lifetime; false - use date*/
	int lifeTime;
	String unit;
	String expireDay;
	String expireMonth;
	String expireYear;
	boolean forTest;
	
	public PolicyProperty(){
		organizationName="";
		emailAddress="";
		webHomePage="";
		phoneNumber="";
		addressName="";
		address="";
		city="";
		state="";
		postalCode="";
		country="";
		policyName="";
		optUrl="";
		policyLanguage="English";
		readablePolicyUrl="";
		access=5;
		assurance=new Vector<Assurance>();
		calMode=true;
		lifeTime=0;
		unit="day(s)";
		expireDay="1";
		expireMonth="Jan";
		expireYear="2000";
		forTest=false;
	}
	
	public PolicyProperty(PolicyProperty p){
		organizationName=p.organizationName;
		emailAddress=p.emailAddress;
		webHomePage=p.webHomePage;
		phoneNumber=p.phoneNumber;
		addressName=p.addressName;
		address=p.address;
		city=p.city;
		state=p.state;
		postalCode=p.postalCode;
		country=p.country;
		policyName=p.policyName;
		optUrl=p.optUrl;
		policyLanguage=p.policyLanguage;
		readablePolicyUrl=p.readablePolicyUrl;
		access=p.access;
		assurance=new Vector<Assurance>(p.assurance);
		calMode=p.calMode;
		lifeTime=p.lifeTime;
		unit=p.unit;
		expireDay=p.expireDay;
		expireMonth=p.expireMonth;
		expireYear=p.expireYear;
		forTest=p.forTest;
	}
	
	//clears all data in pp
	public void clear(){
		organizationName="";
		emailAddress="";
		webHomePage="";
		phoneNumber="";
		addressName="";
		address="";
		city="";
		state="";
		postalCode="";
		country="";
		policyName="";
		optUrl="";
		policyLanguage="English";
		readablePolicyUrl="";
		access=5;
		assurance.clear();
		calMode=true;
		lifeTime=0;
		unit="day(s)";
		expireDay="1";
		expireMonth="Jan";
		expireYear="2010";
		forTest=false;
	}

	public String getOrganizationName() {
		return organizationName;
	}

	public void setOrganizationName(String organizationName) {
		this.organizationName = organizationName;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getWebHomePage() {
		return webHomePage;
	}

	public void setWebHomePage(String webHomePage) {
		this.webHomePage = webHomePage;
	}

	public String getPhoneNumber() {
		return phoneNumber;
	}

	public void setPhoneNumber(String phoneNumber) {
		this.phoneNumber = phoneNumber;
	}

	public String getAddressName() {
		return addressName;
	}

	public void setAddressName(String addressName) {
		this.addressName = addressName;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getPostalCode() {
		return postalCode;
	}

	public void setPostalCode(String postalCode) {
		this.postalCode = postalCode;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getPolicyName() {
		return policyName;
	}

	public void setPolicyName(String policyName) {
		this.policyName = policyName;
	}

	public String getOptUrl() {
		return optUrl;
	}

	public void setOptUrl(String optUrl) {
		this.optUrl = optUrl;
	}

	public String getPolicyLanguage() {
		return policyLanguage;
	}

	public void setPolicyLanguage(String policyLanguage) {
		this.policyLanguage = policyLanguage;
	}

	public String getReadablePolicyUrl() {
		return readablePolicyUrl;
	}

	public void setReadablePolicyUrl(String readablePolicyUrl) {
		this.readablePolicyUrl = readablePolicyUrl;
	}

	public int getAccess() {
		return access;
	}

	public void setAccess(int access) {
		this.access = access;
	}

	public Vector<Assurance> getAssurance() {
		return assurance;
	}

	public void setAssurance(Vector<Assurance> assurance) {
		this.assurance = assurance;
	}

	public boolean isCalMode() {
		return calMode;
	}

	public void setCalMode(boolean calMode) {
		this.calMode = calMode;
	}

	public int getLifeTime() {
		return lifeTime;
	}

	public void setLifeTime(int lifeTime) {
		this.lifeTime = lifeTime;
	}

	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	public String getExpireDay() {
		return expireDay;
	}

	public void setExpireDay(String expireDay) {
		this.expireDay = expireDay;
	}

	public String getExpireMonth() {
		return expireMonth;
	}

	public void setExpireMonth(String expireMonth) {
		this.expireMonth = expireMonth;
	}

	public String getExpireYear() {
		return expireYear;
	}

	public void setExpireYear(String expireYear) {
		this.expireYear = expireYear;
	}

	public boolean isForTest() {
		return forTest;
	}

	public void setForTest(boolean forTest) {
		this.forTest = forTest;
	}
}
